<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>peach.ga.fitness</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="peach-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a href="http://code.google.com/p/peach">Peach - Computational Intelligence for Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="peach-module.html">Package&nbsp;peach</a> ::
        <a href="peach.ga-module.html">Package&nbsp;ga</a> ::
        Module&nbsp;fitness
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="peach.ga.fitness-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="peach.ga.fitness-module.html">Module peach.ga.fitness</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># Peach - Computational Intelligence for Python</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"># Jose Alexandre Nalon</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"># This file: ga/fitness.py</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"># Basic definitions for declaring fitness functions</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"># Doc string, reStructuredText formatted:</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable peach.__doc__=peach-module.html#__doc__,Variable peach.fuzzy.__doc__=peach.fuzzy-module.html#__doc__,Variable peach.fuzzy.base.__doc__=peach.fuzzy.base-module.html#__doc__,Variable peach.fuzzy.cmeans.__doc__=peach.fuzzy.cmeans-module.html#__doc__,Variable peach.fuzzy.control.__doc__=peach.fuzzy.control-module.html#__doc__,Variable peach.fuzzy.defuzzy.__doc__=peach.fuzzy.defuzzy-module.html#__doc__,Variable peach.fuzzy.mf.__doc__=peach.fuzzy.mf-module.html#__doc__,Variable peach.fuzzy.norms.__doc__=peach.fuzzy.norms-module.html#__doc__,Variable peach.ga.__doc__=peach.ga-module.html#__doc__,Variable peach.ga.base.__doc__=peach.ga.base-module.html#__doc__,Variable peach.ga.chromosome.__doc__=peach.ga.chromosome-module.html#__doc__,Variable peach.ga.crossover.__doc__=peach.ga.crossover-module.html#__doc__,Variable peach.ga.fitness.__doc__=peach.ga.fitness-module.html#__doc__,Variable peach.ga.mutation.__doc__=peach.ga.mutation-module.html#__doc__,Variable peach.ga.selection.__doc__=peach.ga.selection-module.html#__doc__,Variable peach.nn.__doc__=peach.nn-module.html#__doc__,Variable peach.nn.af.__doc__=peach.nn.af-module.html#__doc__,Variable peach.nn.base.__doc__=peach.nn.base-module.html#__doc__,Variable peach.nn.kmeans.__doc__=peach.nn.kmeans-module.html#__doc__,Variable peach.nn.lrules.__doc__=peach.nn.lrules-module.html#__doc__,Variable peach.nn.mem.__doc__=peach.nn.mem-module.html#__doc__,Variable peach.nn.nnet.__doc__=peach.nn.nnet-module.html#__doc__,Variable peach.nn.rbfn.__doc__=peach.nn.rbfn-module.html#__doc__,Variable peach.optm.__doc__=peach.optm-module.html#__doc__,Variable peach.optm.base.__doc__=peach.optm.base-module.html#__doc__,Variable peach.optm.linear.__doc__=peach.optm.linear-module.html#__doc__,Variable peach.optm.multivar.__doc__=peach.optm.multivar-module.html#__doc__,Variable peach.optm.quasinewton.__doc__=peach.optm.quasinewton-module.html#__doc__,Variable peach.optm.stochastic.__doc__=peach.optm.stochastic-module.html#__doc__,Variable peach.pso.__doc__=peach.pso-module.html#__doc__,Variable peach.pso.acc.__doc__=peach.pso.acc-module.html#__doc__,Variable peach.pso.base.__doc__=peach.pso.base-module.html#__doc__,Variable peach.sa.__doc__=peach.sa-module.html#__doc__,Variable peach.sa.base.__doc__=peach.sa.base-module.html#__doc__,Variable peach.sa.neighbor.__doc__=peach.sa.neighbor-module.html#__doc__"><a title="peach.__doc__
peach.fuzzy.__doc__
peach.fuzzy.base.__doc__
peach.fuzzy.cmeans.__doc__
peach.fuzzy.control.__doc__
peach.fuzzy.defuzzy.__doc__
peach.fuzzy.mf.__doc__
peach.fuzzy.norms.__doc__
peach.ga.__doc__
peach.ga.base.__doc__
peach.ga.chromosome.__doc__
peach.ga.crossover.__doc__
peach.ga.fitness.__doc__
peach.ga.mutation.__doc__
peach.ga.selection.__doc__
peach.nn.__doc__
peach.nn.af.__doc__
peach.nn.base.__doc__
peach.nn.kmeans.__doc__
peach.nn.lrules.__doc__
peach.nn.mem.__doc__
peach.nn.nnet.__doc__
peach.nn.rbfn.__doc__
peach.optm.__doc__
peach.optm.base.__doc__
peach.optm.linear.__doc__
peach.optm.multivar.__doc__
peach.optm.quasinewton.__doc__
peach.optm.stochastic.__doc__
peach.pso.__doc__
peach.pso.acc.__doc__
peach.pso.base.__doc__
peach.sa.__doc__
peach.sa.base.__doc__
peach.sa.neighbor.__doc__" class="py-name" href="#" onclick="return doclink('link-0', '__doc__', 'link-0');">__doc__</a></tt> <tt class="py-op">=</tt> <tt class="py-docstring">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">Basic definitions and base classes for definition of fitness functions for use</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">with genetic algorithms.</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">Fitness is a function that rates higher the chromosomes that perform better</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">according to the objective function. For example, if the minimum of a function</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">needs to be found, then the fitness function should rate better the chromosomes</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">that correspond to lower values of the objective function. This module gives</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">support to use common Python functions as fitness functions in genetic</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">algorithms.</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring">The classes defined in this sub-module take a function and use some algorithm to</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">rank a population. There are some different ranking functions, some are provided</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">in this module. There is also a class that can be subclassed to generate other</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">fitness methods. See the documentation of the corresponding class for more</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring">information.</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">numpy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">min</tt><tt class="py-op">,</tt> <tt class="py-name">sum</tt><tt class="py-op">,</tt> <tt class="py-name">argsort</tt><tt class="py-op">,</tt> <tt class="py-name">zeros</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-comment"># Classes</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="Fitness"></a><div id="Fitness-def"><a name="L35"></a><tt class="py-lineno"> 35</tt> <a class="py-toggle" href="#" id="Fitness-toggle" onclick="return toggle('Fitness');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="peach.ga.fitness.Fitness-class.html">Fitness</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Fitness-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Fitness-expanded"><a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">    Base class for fitness function classifiers.</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">    This class is used as the base of all fitness functions. However, even if</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">    it is intended to be used as a base class, it also provides some</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">    functionality, described below.</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">    A subclass of this class should implement at least 2 methods:</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">      __init__(self, *args, **kwargs)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">        Initialization method. The initialization procedure doesn't need to take</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">        any parameters, but if any configuration must be done, it should be</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">        passed as an argument to the ``__init__`` function. The genetic</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">        algorithm, however, does not expect parameters in the instantiation, so</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">        you should provide sensible defaults.</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">      __call__(self, fx)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">        This method is called to calculate population fitness. There is no</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">        recomendation about the internals of the method, but its signature is</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">        expected as defined above. This method receives the values of the</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">        objective function applied over a population -- please, consult the</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-docstring">        ``ga`` module for more information on populations -- and should return a</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">        vector or list with the fitness value for each chromosome in the same</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">        order that they appear in the population.</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">      This class implements the standard normalization fitness, as described in</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">      every book and article about GAs. The rank given to a chromosome is</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">      proportional to its objective function value.</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="Fitness.__init__"></a><div id="Fitness.__init__-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="Fitness.__init__-toggle" onclick="return toggle('Fitness.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="peach.ga.fitness.Fitness-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Fitness.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fitness.__init__-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">        Initializes the operator.</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
<a name="Fitness.__call__"></a><div id="Fitness.__call__-def"><a name="L72"></a><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="Fitness.__call__-toggle" onclick="return toggle('Fitness.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="peach.ga.fitness.Fitness-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fx</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Fitness.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fitness.__call__-expanded"><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">        Calculates the fitness for all individuals in the population.</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">        :Parameters:</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">          fx</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">            The values of the objective function for every individual on the</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">            population to be processed. Please, consult the ``ga`` module for</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-docstring">            more information on populations. This method calculates the fitness</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"><tt class="py-docstring">            according to the traditional normalization technique.</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"><tt class="py-docstring">        :Returns:</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">          A vector containing the fitness value for every individual in the</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">          population, in the same order that they appear there.</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt id="link-1" class="py-name" targets="Variable peach.ga.base.GeneticAlgorithm.fx=peach.ga.base.GeneticAlgorithm-class.html#fx,Variable peach.pso.base.ParticleSwarmOptimizer.fx=peach.pso.base.ParticleSwarmOptimizer-class.html#fx,Variable peach.sa.base.ContinuousSA.fx=peach.sa.base.ContinuousSA-class.html#fx"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-1', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-2', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">-</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt id="link-3" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-3', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-4" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-4', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">/</tt> <tt class="py-name">sum</tt><tt class="py-op">(</tt><tt id="link-5" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-5', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="Ranking"></a><div id="Ranking-def"><a name="L92"></a><tt class="py-lineno"> 92</tt> <a class="py-toggle" href="#" id="Ranking-toggle" onclick="return toggle('Ranking');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="peach.ga.fitness.Ranking-class.html">Ranking</a><tt class="py-op">(</tt><tt class="py-base-class">Fitness</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Ranking-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Ranking-expanded"><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">    Ranking fitness for a population</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">    Ranking gives fitness values equally spaced between 0 and 1. The fittest</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">    individual receives fitness equals to 1, the second best equals to 1 - 1/N,</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">    the third best 1 - 2/N, and so on, where N is the size of the population.</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">    It is important to note that the worst fit individual receives a fitness</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"><tt class="py-docstring">    value of 1/N, not 0. That allows that no individuals are excluded from the</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line"><tt class="py-docstring">    selection operator.</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
<a name="Ranking.__init__"></a><div id="Ranking.__init__-def"><a name="L103"></a><tt class="py-lineno">103</tt> <a class="py-toggle" href="#" id="Ranking.__init__-toggle" onclick="return toggle('Ranking.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="peach.ga.fitness.Ranking-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Ranking.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Ranking.__init__-expanded"><a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">        Initializes the operator.</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt id="link-6" class="py-name" targets="Class peach.ga.fitness.Fitness=peach.ga.fitness.Fitness-class.html"><a title="peach.ga.fitness.Fitness" class="py-name" href="#" onclick="return doclink('link-6', 'Fitness', 'link-6');">Fitness</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method peach.fuzzy.base.FuzzySet.__init__()=peach.fuzzy.base.FuzzySet-class.html#__init__,Method peach.fuzzy.cmeans.FuzzyCMeans.__init__()=peach.fuzzy.cmeans.FuzzyCMeans-class.html#__init__,Method peach.fuzzy.control.Controller.__init__()=peach.fuzzy.control.Controller-class.html#__init__,Method peach.fuzzy.control.Parametric.__init__()=peach.fuzzy.control.Parametric-class.html#__init__,Method peach.fuzzy.mf.Bell.__init__()=peach.fuzzy.mf.Bell-class.html#__init__,Method peach.fuzzy.mf.DecreasingRamp.__init__()=peach.fuzzy.mf.DecreasingRamp-class.html#__init__,Method peach.fuzzy.mf.DecreasingSigmoid.__init__()=peach.fuzzy.mf.DecreasingSigmoid-class.html#__init__,Method peach.fuzzy.mf.Gaussian.__init__()=peach.fuzzy.mf.Gaussian-class.html#__init__,Method peach.fuzzy.mf.IncreasingRamp.__init__()=peach.fuzzy.mf.IncreasingRamp-class.html#__init__,Method peach.fuzzy.mf.IncreasingSigmoid.__init__()=peach.fuzzy.mf.IncreasingSigmoid-class.html#__init__,Method peach.fuzzy.mf.Membership.__init__()=peach.fuzzy.mf.Membership-class.html#__init__,Method peach.fuzzy.mf.RaisedCosine.__init__()=peach.fuzzy.mf.RaisedCosine-class.html#__init__,Method peach.fuzzy.mf.Smf.__init__()=peach.fuzzy.mf.Smf-class.html#__init__,Method peach.fuzzy.mf.Trapezoid.__init__()=peach.fuzzy.mf.Trapezoid-class.html#__init__,Method peach.fuzzy.mf.Triangle.__init__()=peach.fuzzy.mf.Triangle-class.html#__init__,Method peach.fuzzy.mf.Zmf.__init__()=peach.fuzzy.mf.Zmf-class.html#__init__,Method peach.ga.base.GeneticAlgorithm.__init__()=peach.ga.base.GeneticAlgorithm-class.html#__init__,Method peach.ga.chromosome.Chromosome.__init__()=peach.ga.chromosome.Chromosome-class.html#__init__,Method peach.ga.crossover.OnePoint.__init__()=peach.ga.crossover.OnePoint-class.html#__init__,Method peach.ga.crossover.TwoPoint.__init__()=peach.ga.crossover.TwoPoint-class.html#__init__,Method peach.ga.crossover.Uniform.__init__()=peach.ga.crossover.Uniform-class.html#__init__,Method peach.ga.fitness.Fitness.__init__()=peach.ga.fitness.Fitness-class.html#__init__,Method peach.ga.fitness.Ranking.__init__()=peach.ga.fitness.Ranking-class.html#__init__,Method peach.ga.mutation.BitToBit.__init__()=peach.ga.mutation.BitToBit-class.html#__init__,Method peach.nn.af.Activation.__init__()=peach.nn.af.Activation-class.html#__init__,Method peach.nn.af.ArcTan.__init__()=peach.nn.af.ArcTan-class.html#__init__,Method peach.nn.af.Gaussian.__init__()=peach.nn.af.Gaussian-class.html#__init__,Method peach.nn.af.Linear.__init__()=peach.nn.af.Linear-class.html#__init__,Method peach.nn.af.Ramp.__init__()=peach.nn.af.Ramp-class.html#__init__,Method peach.nn.af.Sigmoid.__init__()=peach.nn.af.Sigmoid-class.html#__init__,Method peach.nn.af.Signum.__init__()=peach.nn.af.Signum-class.html#__init__,Method peach.nn.af.TanH.__init__()=peach.nn.af.TanH-class.html#__init__,Method peach.nn.af.Threshold.__init__()=peach.nn.af.Threshold-class.html#__init__,Method peach.nn.base.Layer.__init__()=peach.nn.base.Layer-class.html#__init__,Method peach.nn.kmeans.KMeans.__init__()=peach.nn.kmeans.KMeans-class.html#__init__,Method peach.nn.lrules.BackPropagation.__init__()=peach.nn.lrules.BackPropagation-class.html#__init__,Method peach.nn.lrules.Competitive.__init__()=peach.nn.lrules.Competitive-class.html#__init__,Method peach.nn.lrules.Cooperative.__init__()=peach.nn.lrules.Cooperative-class.html#__init__,Method peach.nn.lrules.LMS.__init__()=peach.nn.lrules.LMS-class.html#__init__,Method peach.nn.lrules.WinnerTakesAll.__init__()=peach.nn.lrules.WinnerTakesAll-class.html#__init__,Method peach.nn.mem.Hopfield.__init__()=peach.nn.mem.Hopfield-class.html#__init__,Method peach.nn.nnet.FeedForward.__init__()=peach.nn.nnet.FeedForward-class.html#__init__,Method peach.nn.nnet.GRNN.__init__()=peach.nn.nnet.GRNN-class.html#__init__,Method peach.nn.nnet.PNN.__init__()=peach.nn.nnet.PNN-class.html#__init__,Method peach.nn.nnet.SOM.__init__()=peach.nn.nnet.SOM-class.html#__init__,Method peach.nn.rbfn.RBFN.__init__()=peach.nn.rbfn.RBFN-class.html#__init__,Method peach.optm.base.Optimizer.__init__()=peach.optm.base.Optimizer-class.html#__init__,Method peach.optm.linear.Direct1D.__init__()=peach.optm.linear.Direct1D-class.html#__init__,Method peach.optm.linear.Fibonacci.__init__()=peach.optm.linear.Fibonacci-class.html#__init__,Method peach.optm.linear.GoldenRule.__init__()=peach.optm.linear.GoldenRule-class.html#__init__,Method peach.optm.linear.Interpolation.__init__()=peach.optm.linear.Interpolation-class.html#__init__,Method peach.optm.multivar.Direct.__init__()=peach.optm.multivar.Direct-class.html#__init__,Method peach.optm.multivar.Gradient.__init__()=peach.optm.multivar.Gradient-class.html#__init__,Method peach.optm.multivar.MomentumGradient.__init__()=peach.optm.multivar.MomentumGradient-class.html#__init__,Method peach.optm.multivar.Newton.__init__()=peach.optm.multivar.Newton-class.html#__init__,Method peach.optm.quasinewton.BFGS.__init__()=peach.optm.quasinewton.BFGS-class.html#__init__,Method peach.optm.quasinewton.DFP.__init__()=peach.optm.quasinewton.DFP-class.html#__init__,Method peach.optm.quasinewton.SR1.__init__()=peach.optm.quasinewton.SR1-class.html#__init__,Method peach.optm.stochastic.CrossEntropy.__init__()=peach.optm.stochastic.CrossEntropy-class.html#__init__,Method peach.pso.acc.Accelerator.__init__()=peach.pso.acc.Accelerator-class.html#__init__,Method peach.pso.acc.StandardPSO.__init__()=peach.pso.acc.StandardPSO-class.html#__init__,Method peach.pso.base.ParticleSwarmOptimizer.__init__()=peach.pso.base.ParticleSwarmOptimizer-class.html#__init__,Method peach.sa.base.BinarySA.__init__()=peach.sa.base.BinarySA-class.html#__init__,Method peach.sa.base.ContinuousSA.__init__()=peach.sa.base.ContinuousSA-class.html#__init__,Method peach.sa.neighbor.BinaryNeighbor.__init__()=peach.sa.neighbor.BinaryNeighbor-class.html#__init__,Method peach.sa.neighbor.ContinuousNeighbor.__init__()=peach.sa.neighbor.ContinuousNeighbor-class.html#__init__,Method peach.sa.neighbor.GaussianNeighbor.__init__()=peach.sa.neighbor.GaussianNeighbor-class.html#__init__,Method peach.sa.neighbor.InvertBitsNeighbor.__init__()=peach.sa.neighbor.InvertBitsNeighbor-class.html#__init__,Method peach.sa.neighbor.UniformNeighbor.__init__()=peach.sa.neighbor.UniformNeighbor-class.html#__init__"><a title="peach.fuzzy.base.FuzzySet.__init__
peach.fuzzy.cmeans.FuzzyCMeans.__init__
peach.fuzzy.control.Controller.__init__
peach.fuzzy.control.Parametric.__init__
peach.fuzzy.mf.Bell.__init__
peach.fuzzy.mf.DecreasingRamp.__init__
peach.fuzzy.mf.DecreasingSigmoid.__init__
peach.fuzzy.mf.Gaussian.__init__
peach.fuzzy.mf.IncreasingRamp.__init__
peach.fuzzy.mf.IncreasingSigmoid.__init__
peach.fuzzy.mf.Membership.__init__
peach.fuzzy.mf.RaisedCosine.__init__
peach.fuzzy.mf.Smf.__init__
peach.fuzzy.mf.Trapezoid.__init__
peach.fuzzy.mf.Triangle.__init__
peach.fuzzy.mf.Zmf.__init__
peach.ga.base.GeneticAlgorithm.__init__
peach.ga.chromosome.Chromosome.__init__
peach.ga.crossover.OnePoint.__init__
peach.ga.crossover.TwoPoint.__init__
peach.ga.crossover.Uniform.__init__
peach.ga.fitness.Fitness.__init__
peach.ga.fitness.Ranking.__init__
peach.ga.mutation.BitToBit.__init__
peach.nn.af.Activation.__init__
peach.nn.af.ArcTan.__init__
peach.nn.af.Gaussian.__init__
peach.nn.af.Linear.__init__
peach.nn.af.Ramp.__init__
peach.nn.af.Sigmoid.__init__
peach.nn.af.Signum.__init__
peach.nn.af.TanH.__init__
peach.nn.af.Threshold.__init__
peach.nn.base.Layer.__init__
peach.nn.kmeans.KMeans.__init__
peach.nn.lrules.BackPropagation.__init__
peach.nn.lrules.Competitive.__init__
peach.nn.lrules.Cooperative.__init__
peach.nn.lrules.LMS.__init__
peach.nn.lrules.WinnerTakesAll.__init__
peach.nn.mem.Hopfield.__init__
peach.nn.nnet.FeedForward.__init__
peach.nn.nnet.GRNN.__init__
peach.nn.nnet.PNN.__init__
peach.nn.nnet.SOM.__init__
peach.nn.rbfn.RBFN.__init__
peach.optm.base.Optimizer.__init__
peach.optm.linear.Direct1D.__init__
peach.optm.linear.Fibonacci.__init__
peach.optm.linear.GoldenRule.__init__
peach.optm.linear.Interpolation.__init__
peach.optm.multivar.Direct.__init__
peach.optm.multivar.Gradient.__init__
peach.optm.multivar.MomentumGradient.__init__
peach.optm.multivar.Newton.__init__
peach.optm.quasinewton.BFGS.__init__
peach.optm.quasinewton.DFP.__init__
peach.optm.quasinewton.SR1.__init__
peach.optm.stochastic.CrossEntropy.__init__
peach.pso.acc.Accelerator.__init__
peach.pso.acc.StandardPSO.__init__
peach.pso.base.ParticleSwarmOptimizer.__init__
peach.sa.base.BinarySA.__init__
peach.sa.base.ContinuousSA.__init__
peach.sa.neighbor.BinaryNeighbor.__init__
peach.sa.neighbor.ContinuousNeighbor.__init__
peach.sa.neighbor.GaussianNeighbor.__init__
peach.sa.neighbor.InvertBitsNeighbor.__init__
peach.sa.neighbor.UniformNeighbor.__init__" class="py-name" href="#" onclick="return doclink('link-7', '__init__', 'link-7');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
<a name="Ranking.__call__"></a><div id="Ranking.__call__-def"><a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="Ranking.__call__-toggle" onclick="return toggle('Ranking.__call__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="peach.ga.fitness.Ranking-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fx</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Ranking.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Ranking.__call__-expanded"><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">        Calculates the fitness for all individuals in the population.</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring">        :Parameters:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring">          fx</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"><tt class="py-docstring">            The values of the objective function for every individual on the</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">            population to be processed. Please, consult the ``ga`` module for</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">            more information on populations. This method calculates the fitness</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">            according to the equally spaced ranking technique.</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">        :Returns:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-docstring">          A vector containing the fitness value for every individual in the</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">          population, in the same order that they appear there.</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt id="link-8" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-8', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-9', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">-</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-10', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt id="link-11" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-11', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">argsort</tt><tt class="py-op">(</tt><tt id="link-12" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-12', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-number">1.</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-13" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-13', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-14" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-14', 'fx', 'link-1');">fx</a></tt> <tt class="py-op">/</tt> <tt class="py-name">sum</tt><tt class="py-op">(</tt><tt id="link-15" class="py-name"><a title="peach.ga.base.GeneticAlgorithm.fx
peach.pso.base.ParticleSwarmOptimizer.fx
peach.sa.base.ContinuousSA.fx" class="py-name" href="#" onclick="return doclink('link-15', 'fx', 'link-1');">fx</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-comment">################################################################################</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="peach-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a href="http://code.google.com/p/peach">Peach - Computational Intelligence for Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 31 16:59:51 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
